# Use your path
#LUA_PATH = lua
LUA_PATH = lua
SRC =  src
TARGET = chess.so



#centos
# $(TARGET) :  $(SRC)/main.c  $(LUA_PATH)/liblua.a 
# 	gcc -Wall -g -o $@ $^ -I$(LUA_PATH)/ -lm -ldl


# $(TARGET) :  $(SRC)/lua-chess.c 
# 	gcc -Wall -g --shared -fPIC -o $@ $^  -I$(LUA_PATH)/ 

$(TARGET) :  $(SRC)/*.h $(SRC)/*.cpp
	g++ -Wall -g --shared -fPIC -o $@ $^  -I$(LUA_PATH)/  -lpthread

# $(DIR) : $(SRC)/dir.h $(SRC)/dir.c  $(SRC)/lua-dir.c $(LUA_PATH)/liblua.a     -L$(LUA_PATH)/ -llua -ldl 
# 	gcc -Wall -g -shared -o $@ $^ -I$(LUA_PATH)/ 


# all: $(DIR) $(TARGET)

clean :
	rm $(TARGET) 


